import Button from '../components/Button';
import React from 'react';
import {Platform} from 'react-native';

const ViewUtil = {
  smallBorderButton(title, height, style, onPress) {
    return <Button style={{fontSize: 10, color: '#888888', fontWeight: '500'}}
                   containerStyle={{
                     borderColor: '#888888',
                     borderWidth: 0.5,
                     height: height,
                     paddingHorizontal: 8,
                     borderRadius: height / 2,
                     justifyContent:'center',
                     ...style,
                   }}
                   onPress={onPress}
    >{title}</Button>;
  },
  smallColorButton(title, height, bcgColor, style, fontSize, onPress){
    return <Button style={{fontSize:fontSize || 10, color: 'white', fontWeight: '500'}}
                   containerStyle={{
                     height: height,
                     paddingHorizontal: 8,
                     borderRadius: height / 2,
                     justifyContent:'center',
                     backgroundColor:bcgColor||'#FF762A',
                     ...style,
                   }}
                   onPress={onPress}
    >{title}</Button>;
  },
  boldFont(){
    return Platform.OS === 'ios' ? 'bold' : '500';
  }
};

export default ViewUtil;
